package com.cckj.common.utils;

import org.springframework.context.ApplicationContext;

/**
  * @Description //TODO  springBean 操作类
  * @time: 2021/5/15 上午9:24
  */
public class SpringUtil {

    private static ApplicationContext applicationContext;

    public static void setApplicationContext(ApplicationContext context) {
        applicationContext = context;
    }

    public static <T> T getBean(Class<T> c){
        return applicationContext.getBean(c);
    }

}
